# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-brotlicffi
pkgver=1.0.9.2
pkgrel=4
pkgdesc='Python bindings to the Brotli compression library'
arch=(loong64 x86_64)
url=https://github.com/python-hyper/brotlicffi
license=(MIT)
depends=(
  brotli
  python
  python-cffi
)
makedepends=(
  git
  python-setuptools
)
_tag=de7ee050f809448735f0f05a6379383b8cf4554f
source=(git+https://github.com/python-hyper/brotlicffi.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd brotlicffi
  git describe --tags | sed 's/^v//'
}

build() {
  cd brotlicffi
  USE_SHARED_BROTLI=1 python setup.py build
}

package() {
  cd brotlicffi
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/python-brotlicffi
}

# vim: ts=2 sw=2 et:
